<?php
include (MODULE . "/action/qrySelectCustomerOrder");
if($strStyleSheet == TRUE){
	echo "<table class='Normal' border='0' align='left' width='450'>";
}	
echo "
     <tr>
         <td  width='40'>
             <b>Status</b>
         </td>
		 <td  width='30'>
             <b>Order</b>
         </td>
		 <td>
             <b>Date</b>
         </td>
         
		 <td>
             <b>Shipped Date</b>
         </td>
         <td align='right'>
			<b>Courier</b>
         </td>
     </tr>
";
        //echo $strSQL;
	if(!$myrow[0]==""){
	     do {
			
			if($strPreviousStatus != $myrow["Status"]){
				echo "
				<tr >
					<td colspan='5'>
			              <i><b>".$myrow["Status"]."</b></i>
			         </td>
			     </tr>
				";
			}
			
				echo "
				<tr >
					<td width='10'>
			             &nbsp;
			         </td>
			         <td>
					 	<a href='" . ScreenURL("DisplayOrderHeader",array('intOrderHeaderID'=>$myrow[0]) ) . "' target='_blank'>".$myrow["ID"]."</a>
			             
			         </td>
					 <td>
			              ".$myrow["OrderDate"]."
			         </td>
					 <td>
			              ".$myrow["ShippedDate"]."
			         </td>
			         <td align='right'>
						 ".$myrow["Courier"]."
			         </td>
			     </tr>
				";
			
	         $boBG = -1 - $boBG;
			 $strPreviousStatus = $myrow["Status"];
	     } while ($myrow = mysql_fetch_array($result));
	}else{
		echo "
	     <tr class='MandatoryRed'><br/>
	         <td colspan='5'>
	             This Customer hasn't placed an order yet.
	         </td>
	     </tr>
		";
	}
		if($strStyleSheet == TRUE){
   		echo "</table>";
	}
?>
